<{include file="public/header.tpl"}>
<style type="text/css">
.piclist {
	width:100px;
	height:100px;
	float:left;
	margin:10px 0 0 10px;
	overflow:hidden;
	border:1px solid #aaa;
}
</style>
<div id="page-wrapper">

	<div class="row">
		<div class="col-md-6">
			<a href="<{$app}>/image/add" class="btn btn-success">添加图片</a>
		</div>
		<div class="col-md-6">
			<div class="form-group input-group">
				<input type="text" class="form-control" name="key"
					placeholder="输入链接标题或者地址关键词搜索"> <span
					class="input-group-btn">
					<button class="btn btn-default" type="submit">
						<i class="fa fa-search"></i>
					</button>
				</span>
			</div>
		</div>
	</div>
	<{ include file="public/title.tpl" }>
	<form method="post" action="<{$url}>/del/pid/<{$pid}>" onsubmit="return confirm('你确定要删除选中的所有图片吗?')">
		
		<li class="list-group-item">请从相册中选择需要编辑的图片&nbsp;&nbsp; 
		<{$select }></li>
		<div class="row">
				<script>
					var sel = document.getElementById("sel");

					sel.onchange = function() {
						var pid = this.options[this.selectedIndex].value;
						window.location = "<{$url}>/index/pid/" + pid;
					}

					function show(filename) {
						window
								.open(filename, '_blank',
										"top=0,left=0,width=400px,height=400px,location=yes,scrollbars=yes");
					}
				</script>

				<div style="float: left; margin: 5px 0 20px 0; width: 98%;">
					<{section loop=$images name="ls"}>
					<div class="piclist">
						<img width="100" height="100"
							onclick="show('<{if $images[ls].water eq 1}><{$public}>/uploads/wa_<{$images[ls].name}><{else}><{$public}>/uploads/<{$images[ls].name}><{/if}>')"
							src="<{$public}>/uploads/<{$images[ls].name}>"> 
							<input
							style="position: relative; top: -22px; overflow: hidden"
							type="checkbox" name="id[]" value="<{$images[ls].id}>">
					</div>
					<{sectionelse}>
					<div style="width: 100%; padding-left: 30px; line-height: 80px;">该分类中没有图片.
					</div>
					<{/section}>
				</div>
		</div>
		<li class="list-group-item"><a href="javascript:select()">全选</a>/<a
			href="javascript:fanselect()">反选</a>/<a href="javascript:noselect()">全不选</a>&nbsp;&nbsp;选中项:
			<input name="delb" type="image" title="删除"
			src="<{$res}>/images/delete.gif">&nbsp;&nbsp; 
			<span style="float: right;"> <{$fpage}> </span>
		</li>
	</form>
</div>

<{include file="public/footer.tpl"}>

